<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2019/12/24
 * Time: 15:29
 */

namespace app\common\model;
use think\Model;

class LiveLotteryModel extends Model
{
    public function applyLive()
    {
        return $this->hasOne('ApplyLiveModel','id','live_id');
    }

    public function member()
    {
        return $this->hasOne('WechatUserModel','id','user_id');
    }

//    public function member()
//    {
//        return $this->morphTo(['type','mobile'], [
//            1 => 'app\common\model\UserModel',
//            2 => 'app\common\model\MerchantsModel',
//        ]);
//    }
}